Handling duplicate business keys
When two or more records in the data source have the same business key, you can select the Handle Duplicates check box to prevent an error from occurring when the data warehouse task is run. When this check box is selected, Compose will only add one of the records to the data warehouse.
Since Compose randomly chooses which record to add to the data warehouse, you may want to run a data warehouse task first to see if there are any duplicate record errors. In the event that there are, you can then modify the data source to remove records that have the same business key.
You should also select the Handle Duplicates check box in the following situations:
-
The Data Warehouse task type is either Full Load and Change Tables or Change Tables Only.
This is because the Change Tables may contain two records with the same business key: The old record and the updated record. When the Handle Duplicates check box is selected, the updated record will always be inserted/updated to/in the data warehouse.
- When a single table in the data warehouse is derived from multiple landing zone tables, the same business key will be set for each of the mappings. To prevent an error for occurring, you need to select the Handle Duplicates check box.